<template>
  <div class="demo-title">sticky/demo2</div>
  <Sticky :top="50">
    <div class="sticky-row">吸顶距离 50px</div>
  </Sticky>
  <div style="min-height: 100vh">
    <p v-for="(item, i) in 10" :key="'p'+i">填充内容{{item}}</p>
  </div>
</template>

<script lang="ts" setup>
  import Sticky from '@sscd-mobile/sticky'
</script>

<style lang="less" scoped>
  .sticky-row {
    height: 40px;
    background: #3268ff;
    color: #fff;
    text-align: center;
    line-height: 40px;
  }
  p {
    padding-left: 12px;
    line-height: 150px;
  }
</style>
